define(['plugins/dialog','knockout'],function (dialog,ko) {
	var customModal = function () {
		this.inputVal = ko.observable('green')
	}
	
	customModal.prototype.ok = function () {
		dialog.close(this,this.inputVal())
	}
	customModal.prototype.canDeactivate = function () {
		return dialog.showMessage('你确定那是你最喜欢的颜色？','提示',[{text:'是',value:'Yes'},{text:'不是',value:'No'}]);
	}
	customModal.create = function () {
		return dialog.show(new customModal())
	}
	return customModal;
})